<%@ page contentType="textml;charset=UTF-8" language="java" %>
<%@ include file="../common.jsp" %>
<script type="text/javascript" src="${ctx}/static/js/user.js"></script>



    <div id="dg_user_toolbar">
    <div style="padding: 10px;">
        <form id="searUserParams">
            <label for="user.id">ID:</label><input class="easyui-validatebox" type="number" name="user.id"/>
            <label for="user.name">菜单名称:</label><input class="easyui-validatebox" type="text" name="user.name"/>
            <label for="user.parent_id">父级ID:</label><input class="easyui-validatebox" type="text" name="user.parent_id"/>
        </form>
    </div>
    <span onclick="searchUser()" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</span>
    <span onclick="addUser()" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">新增</span>
    <span onclick="updateUser()" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</span>
    <span onclick="removeUser()" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</span>
</div>


    <table class="easyui-datagrid" id="dg_role"
           data-options="url:'${ctx}/sys/user_searchPage',fit:true,fitColumns:true,singleSelect:true,pagination:true,pageSize:10,toolbar:'#dg_user_toolbar'">
    <thead>
        <tr>
            <th data-options="field:'id',width:100">ID</th>
            <th data-options="field:'name',width:100">角色名</th>
            <th data-options="field:'url',width:100">URL</th>
        </tr>
    </thead>
</table>
    <div id="dl_user_edit" class="easyui-dialog" closed="true" title="编辑菜单" style="width:400px;height:400px; padding: 10px"
         data-options="resizable:true,modal:true,buttons:'#tb_user_edit'">
    <form id="form_user_edit" method="post">
        <div class="mb10">
            <label for="user.id">ID:</label>
            <input class="easyui-validatebox" type="number" name="user.id" data-options="required:true"/>
        </div>
        <div class="mb10">
            <label for="user.name">菜单名称:</label>
            <input class="easyui-validatebox" type="text" name="user.name" data-options="required:true"/>
        </div>
        <div class="mb10">
            <label for="user.url">URL:</label>
            <input class="easyui-validatebox" type="text" name="user.url" data-options=""/>
        </div>
        <div class="mb10">
            <label for="user.parent_id">父级ID:</label>
            <input class="easyui-validatebox" type="text" name="user.parent_id" data-options=""/>
        </div>
    </form>
</div>
    <div id="tb_user_edit">
    <span onclick="submitUser()" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">提交</span>
    <span onclick="closeEdit()" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true">取消</span>
</div>
